<h1>Products#index</h1>
<p>Listing of all products</p>

<table>
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Size</th>
        <th>Code</th>
        <th>Manufacturer</th>
        <th>Supplier</th>
        <th>Price</th>
        <th>Sale Price</th>
        <th>Actual Price</th>
        <th>Updated at</th>
        <th>Created at</th>

    </tr>

    <% @products.each do |product| %>
        <tr>
            <td><%= product.name %></td>
            <td><%= product.description %></td>
            <td><%= product.size %></td>
            <td><%= product.code %></td>
            <td><%= product.manufacturer %></td>
            <td><%= product.supplier %></td>

            <td><%= product.price.format(:symbol=>true) %></td>
            <td><%= product.sale_price.format(:symbol=>true) %></td>
            <td><%= product.actual_price.format(:symbol=>true) %></td>

            <td><%= product.updated_at %></td>
            <td><%= product.created_at %></td>

            <td><%= link_to 'Show', product %></td>
            <td><%= link_to 'Edit', edit_product_path(product) %></td>
            <td><%= link_to 'Destroy', product, confirm: 'Are you sure?', method: :delete %></td>
        </tr>
    <% end %>
</table>

<br/>

<%= link_to 'New Product', new_product_path %>

